package vn.codespot.hms.task;

import vn.codespot.hms.model.request.ApplyRequestModel;
import vn.codespot.hms.model.response.ApplyResponseModel;
import android.content.Context;

public class ApplyTask extends AbstractTask {
    private ITaskListener mListener;

    private ApplyRequestModel mReq;

    private ApplyResponseModel mResp;

    public ApplyTask(Context context, ITaskListener listener, ApplyRequestModel request) {
        super(context, "Applying visa", "Cancel applying visa");
        mListener = listener;
        mReq = request;
    }

    @Override
    protected void executes() {
        mResp = mService.postApply(mReq);
    }

    @Override
    protected void finish() {
        mListener.finish(mResp);
    }
}
